﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Production
{
    public class Transfer : BusinessObject
    {
        public Transfer()
        {
            AddRule(new ValidateRequired("RefID"));

            AddRule(new ValidateRequired("RestaurandID"));

            AddRule(new ValidateRequired("RefNo"));
            AddRule(new ValidateLength("RefNo", 0, 20));

            AddRule(new ValidateRequired("EmployeeID"));
        }

        public Transfer(string refId, string restaurantId, int refType, DateTime refDate, DateTime postedDate, string refNo, string currencyId,
                            decimal exchangeRate, string employeeId, string employeeName, string employeeAddress, string journalMemo,
                            string inwardStockKeeper, string outwardStockKeeper, decimal totalAmount, decimal totalInwardAmount, bool isPosted)
        {
            RefID = refId;
            RestaurandID = restaurantId;
            RefType = refType;
            RefDate = refDate;
            PostedDate = postedDate;
            RefNo = refNo;
            CurrencyID = currencyId;
            ExchangeRate = exchangeRate;
            EmployeeID = employeeId;
            EmployeeName = employeeName;
            EmployeeAddress = employeeAddress;
            JournalMemo = journalMemo;
            InwardStockKeeper = inwardStockKeeper;
            OutwardStockKeeper = outwardStockKeeper;
            TotalAmount = totalAmount;
            TotalInwardAmount = totalInwardAmount;
            IsPosted = isPosted;
        }

        public string RefID { get; set; }

        public string RestaurandID { get; set; }

        public int RefType { get; set; }

        public DateTime RefDate { get; set; }

        public DateTime PostedDate { get; set; }

        public string RefNo { get; set; }

        public string CurrencyID { get; set; }

        public decimal ExchangeRate { get; set; }

        public string EmployeeID { get; set; }

        public string EmployeeName { get; set; }

        public string EmployeeAddress { get; set; }

        public string JournalMemo { get; set; }

        public string InwardStockKeeper { get; set; }

        public string OutwardStockKeeper { get; set; }

        public decimal TotalAmount { get; set; }

        public decimal TotalInwardAmount { get; set; }

        public bool IsPosted { get; set; }
    }
}